#!/bin/sh

SED=@SED@

while getopts hd c; do
    case $c in
	h) help=yes
	;;
	d) debug=yes
	;;
    esac
done

shift `expr $OPTIND - 1`

if [ -z "$debug" ]; then
    $SED -n -e '/^#DEBUG START/ h;/^#DEBUG END/ {x;b};x;s/^#DEBUG START/#DEBUG START/;x;t;p' $1
else
    $SED -n -e '/^#DEBUG START/ n;/^#DEBUG END/ n;p' $1
fi